<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();


if (isset($_GET["user_id"])) {
    $user_id = $_GET["user_id"];
    $user_phone = $database->get("user_text", ["phone"], ["id" => $user_id]);
    $user_phone = $user_phone["phone"];
    $user_email = $database->get("user_text", ["email"], ["id" => $user_id]);
    $user_email = $user_email["email"];
    $user_imgurl = $database->get("user_text", ["imgurl"], ["id" => $user_id]);
    $user_imgurl = $user_imgurl["imgurl"];
    $user_name = $database->get("user_text", ["username"], ["id" => $user_id]);
    $user_name = $user_name["username"];
    $adming = $database->get("user_text", ["sysgrade"], ["id" => $user_id]);
    $adming = $adming["sysgrade"];
    $out = array("user_name" => $user_name, "user_imgurl" => $user_imgurl, "user_email" => $user_email, "user_phone" => $user_phone, "adming" => $adming);
    echo json_encode($out);
    // echo $out;
}





?>